package cn.bonoon.kernel.io;

import java.util.Collection;

import org.springframework.web.multipart.MultipartFile;

public class StorageMultipartFile extends StorageFile{
	
	private final MultipartFile[] files;
	
	StorageMultipartFile(Object catalog, MultipartFile... files) {
		super(catalog);
		
		this.files = files;
	}

	StorageMultipartFile(Object catalog, Collection<MultipartFile> files) {
		this(catalog, files.toArray(new MultipartFile[files.size()]));
	}

	public MultipartFile[] getSourceFile() {
		if(null == files) return new MultipartFile[0];
		return files;
	}
}
